package com.platform.admin.service.strategys;

import com.platform.admin.service.Program;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Programmer {


    private Program program;

    /**
     * 用策略模式编码
     */
    public void codingStrategy(){
        program.coding();
    }

    public static void main(String[] args){
        Programmer programmerI = new Programmer(new IDEA());
        programmerI.codingStrategy();

        Programmer programmerE = new Programmer(new Eclipse());
        programmerE.codingStrategy();
    }
}
